package cn.usian.dao;

import cn.usian.entity.Setmeal;
import cn.usian.entity.SetmealDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface SetmealMapper extends BaseMapper<Setmeal> {
    List<SetmealDTO> findPage(Page<SetmealDTO> setmealPage,@Param("name") String name);

    @Update("update setmeal set is_deleted=1 where id=#{id}")
    void updateIsById(Long id);

    @Update("update setmeal set status=#{status} where id=#{id}")
    void updateone(@Param("id") Long id,@Param("status") Integer status);

}
